extends "../i_TD_scope/i_TD_scope.gd"

func init():
	.init()
	name = "双筒望远镜"
	resetdata()
	info = "双重瞄准：普攻额外对另一个角色（攻击范围内）进行普攻，伤害为50%\n" + info

func _connect():
	._connect()
	masCha.connect("onAtkChara",self,"atkanother")

func atkanother(atkinfo):
	if atkinfo.hitCha.team == masCha.team || atkinfo.atkType != Chara.AtkType.NORMAL:return
	yield(sys.get_tree().create_timer(0.01),"timeout")
	var chas = masCha.getCellChas(masCha.cell,masCha.att.atkRan,1)
	chas.shuffle()
	for i in chas:
		if i == atkinfo.hitCha:continue
		masCha.hurtChara(i,masCha.att.atk*0.5,Chara.HurtType.PHY,Chara.AtkType.EFF)
